package com.common.sdk.net.connect.http.model;

import com.common.sdk.net.connect.http.center.ErrorType;

/**
 * Created by chengjiangsang116630 on 2018/1/18.
 */

public class HttpError {

    public HttpError(ErrorType errorType, String desc) {
        this.errorType = errorType;
        this.desc = desc;
    }

    public HttpError(ErrorType errorType, String desc, Throwable e) {
        this.errorType = errorType;
        this.desc = desc;
        this.e = e;
    }


    private ErrorType errorType;

    private String desc;

    private Throwable e;

    public ErrorType getErrorType() {
        return errorType;
    }

    public void setErrorType(ErrorType errorType) {
        this.errorType = errorType;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public Throwable getE() {
        return e;
    }

    public void setE(Exception e) {
        this.e = e;
    }

    @Override
    public String toString() {
        return "desc=" + desc + ", errorType=" + errorType + ", e=" + (e == null ? "null" : e.getMessage());
    }
}
